package com.zju.DoctorGo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zju.DoctorGo.dto.MessageFilterDTO;
import com.zju.DoctorGo.entity.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageMapper extends BaseMapper<Message> {
    List<Message> selectByFilter(@Param("filter") MessageFilterDTO filter);
}

/* sql:
CREATE TABLE messages (
    id BIGINT AUTO_INCREMENT PRIMARY KEY,
    sender VARCHAR(255) NOT NULL,
    receiver VARCHAR(255) NOT NULL,
    title VARCHAR(255) NOT NULL,
    content TEXT NOT NULL,
    date VARCHAR(255) NOT NULL
);
 */
